package jgcp.message;
/**
 * Define all messages used in the system
 * @Date 31/05/2009
 * @author Jie Zhao (288654)
 * @version 1.0
 */
public interface MessageType {
	/*Worker Section*/
	public static int HEARTBEAT = 0;
	public static int SENDTASK = 1;
	public static int SENDRESULT =2;
	
	public static int CANCELTASK = 10;
	public static int CANCELTASK_ACK = 11;
	
	public static int STATUS_RUNNING = 20;	//worker notify a task is running
	public static int STATUS_DONE = 21;		//worker notify a task is done
	public static int STATUS_ERROR = 22;
	/*Worker Section*/
	
	
	/*Client Section*/
	public static int LOGIN = 100;
	public static int LOGIN_SUCCESS = 101;
	public static int LOGIN_REJECT = 102;
	
	public static int LISTWORKER = 110;
	public static int LISTWORKER_RESPONSE = 111;
	
	public static int SUBMITTASK = 120;
	public static int SUBMITTASK_ACK = 121;
	
	public static int LISTTASKS = 130;
	public static int LISTTASKS_RESPONSE = 131;
	
	public static int QUERYSTATUS = 140;
	public static int QUERYSTATUS_RESPONSE=141;
	
	public static int GETRESULT = 150;
	public static int GETRESULT_NOTREADY = 151;
	public static int GETRESULT_READY = 152;
	/*Client Section Ends.*/
	
	public static int MESSAGE_RESPONSE = 20;
	
	public static int UNKNOWN = 9999;
}
